<%@ page language="java" pageEncoding="UTF-8"%>
 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
    
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Custmer Service</title>

<base href="<%=basePath %>">

<script type="text/javascript" src="ajax-pushlet-client.js"></script>
<script type="text/javascript">
	PL._init();
	PL.joinListen('/lee/ww');
	
	function onData(event)
	{
		fromUser = event.get("fromUser");
		toUser = event.get("toUser");
		content = event.get("content");
		time = event.get("time");
		
        
		var vhtml = "";
		
		vhtml += "<tr><td>" + fromUser + "</td>";
		vhtml += "<td>" + toUser + "</td>";
        vhtml += "<td>" + content + "</td>";
        vhtml += "<td>" + time + "</td></tr>";
        
        //获取到数据表表体
        msgbody = document.getElementById("msgbody");
        msgbody.innerHTML += vhtml;
	}

</script>

</head>
<body>
	
		
		<table border="1" id="msgtable">
			<caption>消息列表</caption>
			<thead>
				<tr> 
					<th>发送者</th>
					<th>接收者</th>
					<th>内容</th>
					<th>发送时间</th>
				</tr>
			</thead>
			<tbody id="msgbody"></tbody>
		</table>
	
	
	
</body>
</html>